import request from '@/utils/request'


/**
 * @description: 登录接口
 * @author: Yong
 * @function   login
 * @param {*}  data
 * @return {*} 
 * @date: 2021-04-24 21:38:38
 */
export function login(data) {
  return request({
    url: 'sys/login',
    method: 'post',
    data
  })
}

/**
 * @description: 获取用户信息接口
 * @author: Yong
 * @function   getUserInfo
 * @param {*}  参数
 * @param {*}  参数
 * @return {*} 
 * @date: 2021-04-25 15:49:43
 */
export function getUserInfo() {
  return request({
    url: '/sys/profile',
    method: 'post',
  })
}

/**
 * @description: 获取用户详细信息接口
 * @author: Yong
 * @function   getUserDetailById
 * @param {*}  id
 * @return {*} 
 * @date: 2021-04-25 16:26:47
 */
export function getUserDetailById (id) {
    return request({
        url: `/sys/user/${id}`
    })
}


export function logout() {
  return request({
    url: '/vue-element-admin/user/logout',
    method: 'post'
  })
}
